package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.VoiceFolderMapper;
import com.ruoyi.ora.domain.VoiceFolder;
import com.ruoyi.ora.service.IVoiceFolderService;

/**
 * 语音文件夹Service业务层处理
 * 
 * @author liuwp
 * @date 2024-12-26
 */
@Service
public class VoiceFolderServiceImpl implements IVoiceFolderService 
{
    @Autowired
    private VoiceFolderMapper voiceFolderMapper;

    /**
     * 查询语音文件夹
     * 
     * @param id 语音文件夹主键
     * @return 语音文件夹
     */
    @Override
    public VoiceFolder selectVoiceFolderById(Long id)
    {
        return voiceFolderMapper.selectVoiceFolderById(id);
    }

    /**
     * 查询语音文件夹列表
     * 
     * @param voiceFolder 语音文件夹
     * @return 语音文件夹
     */
    @Override
    public List<VoiceFolder> selectVoiceFolderList(VoiceFolder voiceFolder)
    {
        return voiceFolderMapper.selectVoiceFolderList(voiceFolder);
    }

    /**
     * 根据业务主键查询一条记录：语音文件夹
     *
     * @param voiceFolder 语音文件夹
     * @return 语音文件夹
     */
    @Override
    public VoiceFolder selectOneVoiceFolder(VoiceFolder voiceFolder)
    {
        return voiceFolderMapper.selectOneVoiceFolder(voiceFolder);
    }

    /**
     * 新增语音文件夹
     * 
     * @param voiceFolder 语音文件夹
     * @return 结果
     */
    @Override
    public int insertVoiceFolder(VoiceFolder voiceFolder)
    {
        voiceFolder.setCreateTime(DateUtils.getNowDate());
        return voiceFolderMapper.insertVoiceFolder(voiceFolder);
    }

    /**
     * 修改语音文件夹
     * 
     * @param voiceFolder 语音文件夹
     * @return 结果
     */
    @Override
    public int updateVoiceFolder(VoiceFolder voiceFolder)
    {
        return voiceFolderMapper.updateVoiceFolder(voiceFolder);
    }

    @Override
    public int updateVoiceFolderCondition(VoiceFolder voiceFolder, VoiceFolder voiceFolderCondition)
    {
        return voiceFolderMapper.updateVoiceFolderCondition(voiceFolder, voiceFolderCondition);
    }

    /**
     * 批量删除语音文件夹
     * 
     * @param ids 需要删除的语音文件夹主键
     * @return 结果
     */
    @Override
    public int deleteVoiceFolderByIds(Long[] ids)
    {
        return voiceFolderMapper.deleteVoiceFolderByIds(ids);
    }

    /**
     * 删除语音文件夹信息
     * 
     * @param id 语音文件夹主键
     * @return 结果
     */
    @Override
    public int deleteVoiceFolderById(Long id)
    {
        return voiceFolderMapper.deleteVoiceFolderById(id);
    }

    /**
     * 条件删除语音文件夹
     *
     * @param voiceFolder 语音文件夹
     * @return 结果
     */
    @Override
    public int deleteVoiceFolderByCondition(VoiceFolder voiceFolder)
    {
        return voiceFolderMapper.deleteVoiceFolderByCondition(voiceFolder);
    }

}
